-- duplicate of SetValue, used by radioButton behavior
if v_me = 0 then -- setting "OFF"
set the member of sprite the spriteNum of me = the normalMember of me
set the Setting of me = 0
else -- setting "ON"
set the member of sprite the spriteNum of me = the toggleMember of me
set the Setting of me = 1
end if
updateStage
end
on getBehaviorDescription
return "Makes a sprite work as a toggle button with automatic highlighting and mouse tracking. The behavior responds when clicked, or when the SetToggleValue or Toggle messages are receieved. Use the the UI Radio Group behavior to control toggle buttons in radio button groups." & RETURN & "PARAMETERS:" & RETURN & "ò Toggle Image - Choose the cast member to display when the button is toggled." & RETURN & "ò Initially Toggled - Turn this option to make the button toggled when it first appears." & RETURN & "MESSAGES:"& RETURN & "ò SetToggleValue {TRUE or FALSE} - Sets the toggle button."& RETURN & "ò Toggle - Switches the toggle button state."